String classe = "Turma"
def objeto = classe[0].toLowerCase() + classe[1.. (classe.size() - 1)]
def text = """
<%@ page import=\"sige.${classe}\" %>
<!doctype html>
<html>
    <head>
        <meta name=\"layout\" content=\"main\">
        <g:set var=\"entityName\" value=\"\${message(code: '${objeto}.label', default: '${classe}')}\" />
        <title><g:message code=\"default.edit.label\" args=\"[entityName]\" /></title>
    </head>
    <body>
        <center>
            <h1><g:message code=\"default.edit.label\" args=\"[entityName]\" /></h1>
        </center>
        <ul class=\"breadcrumb\">
            <li>
                <a href=\"\${createLink(uri: '/')}\">
                  <i class=\"icon-home\"></i>
                  <g:message code=\"default.home.label\"/>
                </a>
                <span class=\"divider\"><g:message code=\"span.divider\" /></span>
            </li>
            <li>
                <g:link action=\"list\">
                    <i class=\"icon-list\"></i>
                    <g:message code=\"default.list.label\" args=\"[entityName]\" />
                </g:link>
                <span class=\"divider\"><g:message code=\"span.divider\" /></span>
            </li>
            <li>
                <g:link action=\"create\">
                    <i class=\"icon-file\"></i>
                    <g:message code=\"default.new.label\" args=\"[entityName]\" />
                </g:link>
            </li>
        </ul>
        <div id=\"edit-${objeto}\" class=\"content scaffold-edit\" role=\"main\">
			<g:if test=\"\${flash.message}\">
            	<div class=\"alert alert-info\">
                <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
                \${flash.message}
            </div>
            </g:if>
            <g:hasErrors bean=\"\${${objeto}Instance}\">
            <ul class=\"alert alert-error\">
                <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
                <g:eachError bean=\"\${${objeto}Instance}\" var=\"error\">
                    <li <g:if test=\"\${error in org.springframework.validation.FieldError}\">data-field-id=\"\${error.field}\"</g:if>><g:message error=\"\${error}\"/></li>
                </g:eachError>
            </ul>
            </g:hasErrors>
            <g:form method=\"post\" class=\"span8 offset3\">
                <g:hiddenField name=\"id\" value=\"\${${objeto}Instance?.id}\" />
                <g:hiddenField name=\"version\" value=\"\${${objeto}Instance?.version}\" />
                <fieldset class=\"form-horizontal well\">
                        <g:render template=\"form\"/>
                </fieldset>
                <fieldset class=\"form-actions\">
                    <g:actionSubmit class=\"btn btn-primary\" action=\"update\" value=\"\${message(code: 'default.button.update.label', default: 'Update')}\" />
                    <a data-toggle=\"modal\" href=\"#myModal\" class=\"btn btn-danger\">
                        <i class=\"icon-trash icon-white\"></i>
                        <g:message code=\"default.button.delete.label\" default=\"Delete\" /> 
                    </a>
                    <!--------MODAL----------->
                    <div class=\"modal hide\" id=\"myModal\">
                        <div class=\"modal-header\">
                            <a class=\"close\" data-dismiss=\"modal\">×</a>
                            <h3><g:message code=\"default.button.delete.atention.message\" default=\"Attention!\" /></h3>
                        </div>
                        <div class=\"modal-body\">
                            <p><g:message code=\"default.button.delete.confirm.message\" default=\"Are you sure?\" /> </p>
                        </div>
                        <div class=\"modal-footer\">
                            <a class=\"btn\" data-dismiss=\"modal\">
                                <g:message code=\"default.cancel.label\" default=\"Cancelar\" />
                            </a>
                            <g:actionSubmit class=\"btn btn-danger\" action=\"delete\" value=\"\${message(code: 'default.button.delete.label', default: 'Delete')}\" />
                        </div>
                    </div>
                </fieldset>
            </g:form>
        </div><!--edit-${objeto}-->
    </body>
</html>
"""
